﻿Create Function GetMaxPriceByStoneTypeId
(
	@StoneTypeId int
)
Returns Int
As
Begin
	
	Declare @MaxPrice int

	select 
		@MaxPrice = max(Price)
	from stone 
	where StoneTypeId = @StoneTypeId

	return 	@MaxPrice

End